// mockService.js - 模拟接口服务配置
import Mock from 'mockjs';

// 热门榜单数据
const hotSongs = [
  { id: 1, musicid: 'H001', title: '热门星光下的梦想', artist: '周杰伦', createTime: '2023-11-15', commentCount: 890, likeCount: 4500, shareCount: 620, playCount: 850000, image: '/static/images/preview1.jpg' },
  { id: 2, musicid: 'H002', title: '热门青春修炼手册', artist: '王俊凯', createTime: '2023-11-10', commentCount: 750, likeCount: 3800, shareCount: 510, playCount: 720000, image: '/static/images/preview1.jpg' },
  { id: 3, musicid: 'H003', title: '热门告白气球', artist: '周杰伦', createTime: '2023-11-05', commentCount: 920, likeCount: 5200, shareCount: 780, playCount: 950000, image: '/static/images/preview1.jpg' },
  { id: 4, musicid: 'H004', title: '热门七里香', artist: '周杰伦', createTime: '2023-10-28', commentCount: 850, likeCount: 4900, shareCount: 650, playCount: 890000, image: '/static/images/preview1.jpg' },
  { id: 5, musicid: 'H005', title: '热门晴天', artist: '周杰伦', createTime: '2023-10-20', commentCount: 980, likeCount: 5800, shareCount: 820, playCount: 1200000, image: '/static/images/preview1.jpg' },
  { id: 6, musicid: 'H006', title: '热门夜曲', artist: '周杰伦', createTime: '2023-10-15', commentCount: 780, likeCount: 4200, shareCount: 590, playCount: 780000, image: '/static/images/preview1.jpg' },
  { id: 7, musicid: 'H007', title: '热门稻香', artist: '周杰伦', createTime: '2023-10-10', commentCount: 820, likeCount: 4600, shareCount: 630, playCount: 830000, image: '/static/images/preview1.jpg' },
  { id: 8, musicid: 'H008', title: '热门简单爱', artist: '周杰伦', createTime: '2023-10-05', commentCount: 950, likeCount: 5400, shareCount: 750, playCount: 980000, image: '/static/images/preview1.jpg' },
  { id: 9, musicid: 'H009', title: '热门以父之名', artist: '周杰伦', createTime: '2023-09-28', commentCount: 880, likeCount: 4900, shareCount: 680, playCount: 920000, image: '/static/images/preview1.jpg' },
  { id: 10, musicid: 'H010', title: '热门青花瓷', artist: '周杰伦', createTime: '2023-09-20', commentCount: 910, likeCount: 5100, shareCount: 710, playCount: 940000, image: '/static/images/preview1.jpg' }
];

// 新生榜单数据
const newSongs = [
  { id: 11, musicid: 'N001', title: '新生夏日未央', artist: '李荣浩', createTime: '2023-11-18', commentCount: 120, likeCount: 350, shareCount: 45, playCount: 12000, image: '/static/images/preview2.jpg' },
  { id: 12, musicid: 'N002', title: '新生告白之夜', artist: '邓紫棋', createTime: '2023-11-17', commentCount: 95, likeCount: 280, shareCount: 38, playCount: 9500, image: '/static/images/preview2.jpg' },
  { id: 13, musicid: 'N003', title: '新生星辰大海', artist: '周深', createTime: '2023-11-16', commentCount: 150, likeCount: 420, shareCount: 55, playCount: 15000, image: '/static/images/preview2.jpg' },
  { id: 14, musicid: 'N004', title: '新生年少有为', artist: '李荣浩', createTime: '2023-11-14', commentCount: 110, likeCount: 320, shareCount: 42, playCount: 11000, image: '/static/images/preview2.jpg' },
  { id: 15, musicid: 'N005', title: '新生光年之外', artist: '邓紫棋', createTime: '2023-11-13', commentCount: 130, likeCount: 380, shareCount: 50, playCount: 13000, image: '/static/images/preview2.jpg' },
  { id: 16, musicid: 'N006', title: '新生大鱼', artist: '周深', createTime: '2023-11-12', commentCount: 140, likeCount: 400, shareCount: 52, playCount: 14000, image: '/static/images/preview2.jpg' },
  { id: 17, musicid: 'N007', title: '新生模特', artist: '李荣浩', createTime: '2023-11-11', commentCount: 100, likeCount: 290, shareCount: 39, playCount: 10000, image: '/static/images/preview2.jpg' },
  { id: 18, musicid: 'N008', title: '新生句号', artist: '邓紫棋', createTime: '2023-11-09', commentCount: 90, likeCount: 260, shareCount: 35, playCount: 9000, image: '/static/images/preview2.jpg' },
  { id: 19, musicid: 'N009', title: '新生触不可及', artist: '周深', createTime: '2023-11-08', commentCount: 125, likeCount: 360, shareCount: 47, playCount: 12500, image: '/static/images/preview2.jpg' },
  { id: 20, musicid: 'N010', title: '新生李白', artist: '李荣浩', createTime: '2023-11-07', commentCount: 115, likeCount: 330, shareCount: 43, playCount: 11500, image: '/static/images/preview2.jpg' }
];

// 随机榜单数据
const randomSongs = [
  { id: 21, musicid: 'R001', title: '随机小幸运', artist: '田馥甄', createTime: '2023-10-15', commentCount: 350, likeCount: 1200, shareCount: 180, playCount: 150000, image:  '/static/images/fengjin.png' },
  { id: 22, musicid: 'R002', title: '随机演员', artist: '薛之谦', createTime: '2023-09-20', commentCount: 420, likeCount: 1500, shareCount: 220, playCount: 180000, image: '/static/images/fengjin.png' },
  { id: 23, musicid: 'R003', title: '随机小苹果', artist: '筷子兄弟', createTime: '2023-08-10', commentCount: 580, likeCount: 2100, shareCount: 320, playCount: 250000, image: '/static/images/fengjin.png' },
  { id: 24, musicid: 'R004', title: '随机江南', artist: '林俊杰', createTime: '2023-11-05', commentCount: 480, likeCount: 1800, shareCount: 260, playCount: 220000, image: '/static/images/fengjin.png' },
  { id: 25, musicid: 'R005', title: '随机成都', artist: '赵雷', createTime: '2023-10-25', commentCount: 450, likeCount: 1600, shareCount: 240, playCount: 200000, image: '/static/images/fengjin.png' },
  { id: 26, musicid: 'R006', title: '随机起风了', artist: '买辣椒也用券', createTime: '2023-09-15', commentCount: 520, likeCount: 1900, shareCount: 290, playCount: 230000, image: '/static/images/fengjin.png' },
  { id: 27, musicid: 'R007', title: '随机追光者', artist: '岑宁儿', createTime: '2023-08-25', commentCount: 380, likeCount: 1300, shareCount: 190, playCount: 160000, image: '/static/images/fengjin.png' },
  { id: 28, musicid: 'R008', title: '随机年少有为', artist: '李荣浩', createTime: '2023-11-10', commentCount: 410, likeCount: 1400, shareCount: 210, playCount: 170000, image: '/static/images/fengjin.png' },
  { id: 29, musicid: 'R009', title: '随机芒种', artist: '音阙诗听', createTime: '2023-10-05', commentCount: 490, likeCount: 1700, shareCount: 250, playCount: 210000, image: '/static/images/fengjin.png' },
  { id: 30, musicid: 'R010', title: '随机野狼Disco', artist: '宝石Gem', createTime: '2023-09-05', commentCount: 550, likeCount: 2000, shareCount: 300, playCount: 240000, image: '/static/images/fengjin.png' }
];

// 榜单数据列表
const hotList = { list: hotSongs };
const newList = { list: newSongs };
const randomList = { list: randomSongs };


// 模拟热门榜单接口
Mock.mock('/api/music/hot', 'get', () => {
  return {
    code: 200,
    message: 'success',
    data: hotList
  };
});

// 模拟新生榜单接口
Mock.mock('/api/music/new', 'get', () => {
  return {
    code: 200,
    message: 'success',
    data: newList
  };
});

// 模拟随机榜单接口
Mock.mock('/api/music/random', 'get', () => {
  return {
    code: 200,
    message: 'success',
    data: randomList
  };
});

console.log('Mock接口服务已启动');

export default Mock;